package com.gc.services.impl;

import com.gc.dao.custom.RoleMapper;
import com.gc.pojo.SysRole;
import com.gc.services.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;
    @Override
    public List<SysRole> getAll() {
        return roleMapper.selectAll();
    }

    @Override
    public SysRole getByUserId(Integer userId) {
        return roleMapper.selectByUserId(userId);
    }
}
